package com.lp.biz.order.service;

import com.lp.biz.order.model.entity.BizOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lp.biz.order.model.query.OrderListQuery;
import com.lp.biz.order.model.vo.OrderRefund;
import com.lp.common.utils.CommonResult;

import javax.servlet.http.HttpServletResponse;

/**
 * BizOrder 服务类
 * @program: backend
 * @author Ke.Song
 * @since 2024-05-26 11:00:59
 */
public interface BizOrderService extends IService<BizOrder> {

    /**
     * 退款
     *
     * @param orderId 订单id
     * @param params 退款参数
     */
    void orderRefund(Integer orderId, OrderRefund params);

    /**
     * 获取订单列表
     * @param query 查询参数
     * @return 查询结果
     */
    CommonResult orderList(OrderListQuery query);

    /**
     * 获取订单详情
     * @param orderId 订单id
     * @return 查询结果
     */
    CommonResult getOrderDetail(Integer orderId);

    /**
     * 导出订单Excel
     * @param query 查询条件
     * @param response 响应体
     */
    void exportOrders(OrderListQuery query, HttpServletResponse response);

}
